package com.education.welco.mapper;

import com.education.welco.pojo.OrderAnswer;
import com.education.welco.pojo.vo.QuestionParsingVo;
import com.education.welco.pojo.vo.ReadQuestionsVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * 答案表 数据层
 *
 * @author d
 * @date 2021-03-04 15:45:19
 */
@Repository
public interface OrderAnswerMapper {

    //查询答案表信息
    public OrderAnswer selectOrderAnswerById(Integer id);

    // 查询答案表列表
    public List<OrderAnswer> selectOrderAnswerList(OrderAnswer orderAnswer);

    // 新增答案表
    public int insertOrderAnswer(OrderAnswer orderAnswer);

    //修改答案表
    public int updateOrderAnswer(OrderAnswer orderAnswer);

    public int updateOrderAnswer1(OrderAnswer orderAnswer);



    //删除答案表
    public int deleteOrderAnswerById(Integer id);

    public int deleteOrderAnswerById1(@Param("userId") Integer userId, @Param("paperId") Integer paperId);

    public int deleteOrderAnswerById3(@Param("questionId") Integer questionId, @Param("paperId") Integer paperId);

    // 批量删除答案表
    public int deleteOrderAnswerByIds(String[] ids);

    //查询提交人数
    public String[] selectOrderSubmit(Integer paperId);

    public List<OrderAnswer> selectOrderAnswerList1(OrderAnswer orderAnswer);

    public List<OrderAnswer> selectOrderAnswerList4(OrderAnswer orderAnswer);

    public OrderAnswer selectOrderAnswerList2(Integer paperId, Integer questionId);

    public OrderAnswer selectOrderAnswerList3(@Param("paperId") Integer paperId, @Param("userId") Integer userId, @Param("questionId") Integer questionId);


    List<QuestionParsingVo> selectQuestionParsing(@Param("paperId") Integer paperId, @Param("userId") Integer userId);

    List<ReadQuestionsVo> selectQuestionParsing2(@Param("paperId") Integer paperId, @Param("userId") Integer userId);

}